#ifndef VENUS_COMMON_GLOBAL_UTILS_H
#define VENUS_COMMON_GLOBAL_UTILS_H

#include<string> 

namespace venus {
class Utils {
 public:
  static int TerminalWidth();

  template<typename T>
  static void SetNULL(T *array[], int count) {
    for (int i = 0; i < count; ++i) array[i] = NULL;
  }
  template<typename T>
  static void SetNULL(T *&ptr) { ptr = NULL; }

  template<typename T>
  static void Delete(T *array[], int count) {
    for (int i = 0; i < count; ++i) {
      delete array[i]; array[i] = NULL;
    }
  }

  template<typename T>
  static void Delete(T *&ptr) { delete ptr; ptr = NULL; }

  static const int s_modulo[4];
  static int line_num;
  static std::string current_file;
};

struct VenusOptions {
  static int core_num;
  static bool quick_render;
  static bool quiet, verbose;
  static const char *project_path;
};
}//namespace venus

#endif // VENUS_COMMON_GLOBAL_UTILS_H
